package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.library.common.GeoPoint;
import com.njtoyo.taxi.admin.mapper.master.enums.RideCategory;
import com.njtoyo.taxi.admin.mapper.master.enums.RidePlatform;
import com.njtoyo.taxi.admin.mapper.master.enums.RideStateState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-09-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Ride对象", description = "")
public class Ride implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "行程编号")
    private String number;

    private GeoPoint origin;

    private String originName;

    @ApiModelProperty(value = "起点详细路名")
    private String originPlaceName;

    private GeoPoint destination;

    private String destinationName;

    @ApiModelProperty(value = "目的地详细路名")
    private String destinationPlaceName;

    private Long taxiId;

    private Long driverId;

    private Long userId;

    private Long companyId;

    private Long areaId;

    private Long cantonId;

    private Long locateCityId;

    @ApiModelProperty(value = "0:waiting,1:contracted,2:pickuping,3:started,4:ended,5:completed,6:marked,7:cancelled,8:forcecancelled,9:inarea")
    private RideStateState state;

    private Integer distance;

    @ApiModelProperty(value = "0:realtime,1:appointment,2:assign")
    private RideCategory category;

    private Long contractedTimestamp;

    @ApiModelProperty(value = "系统预估接乘客最迟到达时间")
    private Date estimatedPickupAt;

    private GeoPoint callOrigin;

    private GeoPoint callDestination;

    private String callOriginName;

    private String callDestinationName;

    @ApiModelProperty(value = "加价")
    private Integer priceMarkup;

    private Long isImitate;

    @ApiModelProperty(value = "0:wxmina(微信小程序),1:app(APP),2:h5(h5网页),3:webkit(全澄通),4:h5Market(h5本地生活)")
    private RidePlatform platform;

    @ApiModelProperty(value = "相对应的call_id")
    private Long refId;

    @ApiModelProperty(value = "是否是代人叫车订单")
    private Boolean isPassengerSubstitution;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    private Boolean hasOnline;

    private Long callType;
}
